#pragma once

#include "IComponent.h"
#include "Pointer.h"
#include "Trigger.h"
#include "RigidBody.h"
#include "Vector3D.h"

class SelectableComponent : public IComponent
{
public:
	static Pointer<IComponent> Create( std::string& args, Entity* parent );

	static const HashedString type;
	
	SelectableComponent( Entity* parent );
	SelectableComponent( Pointer<RigidBody>& body, Entity* parent );
	~SelectableComponent();

	const HashedString& Type();
	std::string ToString() const;
	bool ToXML( tinyxml2::XMLPrinter& printer );

	Pointer<RigidBody>& getBody();
	Pointer<TriggerBase>& getPosition();
	void setPosition( const Maths::Vector3D& position );
	
	Maths::Vector3D Position();

	void ReceiveMessage( IMessage* message );
protected:
	Pointer<TriggerBase> m_position;
	Pointer<RigidBody> m_body;
};